<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <style>
    table {
      /* border: solid 1px #000; */
      border-collapse: collapse;
      margin: 100px auto;
    }
    td {
      border: solid 1px #000;
      width: 84px;
      padding-left: 8px;
      background-color: rgb(160, 238, 87);
    }
  </style>
  <body>
    <script>
      var str = "<table>"
      for (var a = 1; a <= 9; a++) {
        str += "<tr>"
        for (var b = 1; b <= a; b++) {
          str += `<td>${b} × ${a} = ${a * b} </td>`
        }
        str += "</tr>"
      }

      str += "</table>"
      document.write(str)
    </script>
  </body>
</html>
